<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite App</title>
  </head>
  <body>
    <div id="app">
      <button>获取注入对象信息</button>
      <button>查询用户</button>
      <button>删除用户</button>
      <button>更新用户</button>
      <!-- 引入调试控制台 -->
      <script src="https://cdn.bootcdn.net/ajax/libs/eruda/3.3.0/eruda.min.js"></script>
      <script>
        eruda.init()
      </script>
    </div>
    <!-- <script type="module" src="/src/main.ts"> -->
    <script>
      const btns = document.querySelectorAll('button')
      btns[0].addEventListener('click', () => {
        // console.log('mkmkmk', mk.bbb) // 无效
        // console.log('mkmkmk', mk.aaa())
        console.log(mk)
      })
      // 查询用户
      btns[1].addEventListener('click', () => {
        const res = mk.queryUser()
        console.log(res)
      })
      // 删除
      btns[2].addEventListener('click', () => {
        mk.removeUser()
      })
      // 更新
      btns[3].addEventListener('click', () => {})
    </script>
  </body>
</html>
